package com.shopping_back.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shopping_back.pojo.dto.PageDTO;
import com.shopping_back.pojo.dto.ProductDTO;
import com.shopping_back.pojo.dto.SpuSearchDTO;
import com.shopping_back.pojo.entity.Spu;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shopping_back.pojo.vo.ProductVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品SPU表 服务类
 * </p>
 *
 * @author Jack
 * @since 2025-07-12
 */
public interface ISpuService extends IService<Spu> {

    PageDTO<ProductDTO> getProductsByCategory(Long categoryId, Integer pageNum, Integer pageSize);

    Map<String, Object> search(SpuSearchDTO dto);

    Spu getSpuWithSkuList(Long spuId);

    Page<ProductVO> getProducts(Long merchantId, Integer page, Integer size);

    void createProduct(ProductDTO productDTO);

    void updateProduct(ProductDTO productDTO);

    void toggleProductStatus(Long spuId, Integer status);

    PageDTO<Spu> listPending(Integer page, Integer size);
}
